<template>
  <page-loading :show="pageLoading">
    <!-- 发布  第二版样式  寻车发布成功页面-->
    <view class="content">
      <view class="layout">
        <!--      车辆信息-->
        <view class="brands">
          <car-info :carInfo="Brandinformation"></car-info>
        </view>
        <!--      配件列表-->
        <view
          class="Contentlayout"
          v-for="(item, index) in Selectresult"
          :key="index"
        >
          <view class="conlanum">
            {{ index + 1 }}
          </view>
          <view class="conbox">
            <view class="conl1">
              <view class="jqyou flex-1">
                {{ item.part_Category_Name }}
              </view>
              <view class="">
                <u-number-box
                  v-model="item.purchase_Number"
                  :input-width="72"
                  :input-height="40"
                  :min="1"
                  :long-press="false"
                ></u-number-box>
              </view>
            </view>
            <!-- <view class="context">
						<view class="contitle">
							OE:
						</view>
						<view class="connr">
							{{item.oe}}
						</view>
					</view>
					<view class="context">
						<view class="contitle">
							4S价：
						</view>
						<view class="connr">
							￥{{item.money}}
						</view>
					</view> -->
            <view class="context">
              <view class="contitle" style="margin-top: 24rpx"> 图片： </view>
              <view class="conimgbox">
                <!-- 默认图 -->
                <view
                  class="comimg"
                  @click="UploadIDcardImgtk(index)"
                  v-show="item.images.length < 5"
                >
                  <u-icon name="plus" color="#999" size="20rpx"></u-icon>
                </view>
                <view
                  class="comtup"
                  v-for="(item1, index2) in item.images"
                  :key="index2"
                >
                  <!-- 长按显示删除 -->
                  <view class="comdelete" v-show="Pressb" @click="quxiaosc">
                    <view @click="deletecom(index2)">
                      <i-icon
                        icon="iconshanchu1"
                        type="single"
                        size="30rpx"
                        color="#fff"
                      ></i-icon>
                    </view>
                  </view>
                  <!-- 上传的图片 -->
                  <view class="coimgs" @longpress.stop="logoTime">
                    <image :src="item1" mode="aspectFill"></image>
                  </view>
                </view>
              </view>
            </view>
            <view class="context">
              <view class="contitle"> 说明： </view>
              <view class="connr">
                <textarea
                  maxlength="100"
                  v-model="item.explain_Text"
                  class="boadr"
                  placeholder-style="font-size:24rpx;color:#999999"
                  placeholder="补充配件描述"
                ></textarea>
              </view>
            </view>
          </view>
        </view>
        <!--      添加配件-->
        <view class="Addaccessories" @click="Addaccesclick">
          <view class="addimgs">
            <i-icon
              icon="icontianjia1"
              type="single"
              size="45rpx"
              color="#FBD220"
            ></i-icon>
          </view>
          <view class="xinjian"> 添加配件 </view>
        </view>
        <!--			发票品质-->
        <view class="qualitybox">
          <view class="quality">
            <view class="quaname"> 品质 </view>
            <view class="quboxs">
              <view
                :class="!(index === Qualityselect) ? 'xuanzhong' : 'weuixuan'"
                v-for="(item, index) in quality"
                :key="index"
                @click="selectQuality(index)"
              >
                {{ item }}
              </view>
            </view>
          </view>
          <view class="invoice">
            <view class="fapiao"> 发票 </view>
            <view class="invfapao">
              <view
                class="infuxuf"
                v-for="(item, index) in invoice"
                :key="index"
                @click="Invoiceselection(index)"
              >
                <view class="invimg">
                  <i-icon
                    v-show="item && Invoiceselect !== index"
                    icon="icontuoyuan"
                    type="single"
                    size="40rpx"
                    color="#666"
                  ></i-icon>
                  <u-icon
                    v-show="item && Invoiceselect === index"
                    name="checkmark-circle-fill"
                    color="#FBD220"
                    size="40rpx"
                  ></u-icon>
                </view>
                <view class="invname">
                  {{ item }}
                </view>
              </view>
            </view>
          </view>
          <view class="invoice">
            <view class="fapiao"> 收货地址 </view>
            <view class="address" @click="Harvestaddress">
              <view class="addname">
                <view class="ximgm">
                  {{ addresslist.name }}
                </view>
                <view class="mobile">
                  {{ addresslist.mobile }}
                </view>
              </view>
              <view class="addressobx" v-if="addresslist.id">
                {{ addresslist.mcprovince }}{{ addresslist.mccity
                }}{{ addresslist.mcdistrict }}{{ addresslist.address }}
              </view>
              <view class="addressobx pt-5" v-else>
                {{ addresslist.address }}
              </view>
            </view>
            <view class="jiantou">
              <u-icon name="arrow-right" color="#999" size="24rpx"></u-icon>
            </view>
          </view>
          <view class="invoice" @click="valclick" style="border-bottom: none">
            <view class="fapiao"> 有效期 </view>
            <view class="Validperiod">
              <view class="timecss">
                {{ Production }}
              </view>
              <view class="jianjina">
                <u-icon name="arrow-right" color="#999" size="24rpx"></u-icon>
              </view>
            </view>
          </view>
        </view>
      </view>
      <view style="height: 140rpx"></view>
      <!--    按钮-->
      <view class="quedingbtn" v-show="type == '0'">
        <button @click="chakanwxc">确认提交</button>
      </view>
      <view class="quedingbtn" v-show="type === '1'">
        <view class="quxboxs">
          <button class="quxiaoxj" @click="Cancelinquiry">取消询价</button>
          <button class="wancheng" @click="chakanwxc">完成修改</button>
        </view>
      </view>

      <!-- 图片选择-->
      <u-popup v-model="showimg" mode="bottom" length="26%" border-radius="30">
        <view class="hgzbox">
          <view class="imgtexts"> 选择图片上传方式 </view>
          <view class="hgxz" @click="uploadIDcardImg(0)"> 相册 </view>
          <view
            style="
              border-bottom: 1px solid #eeeeee;
              width: 702rpx;
              margin-left: 24rpx;
            "
          ></view>
          <view class="hgxz" @click="uploadIDcardImg(1)"> 拍照 </view>
        </view>
      </u-popup>
      <ctime
        :title="'选择日期'"
        :showsc="showsc"
        @confirmTime="confirmsc"
        @closeTime="closeTime"
      ></ctime>

      <view>
        <u-modal
          title="取消询价"
          v-model="showxj"
          width="74%"
          :mask-close-able="true"
          :title-style="{
            fontWeight: 'bold',
            fontSize: '36rpx',
            color: '#333333',
          }"
          :show-confirm-button="false"
        >
          <view class="slot-content">
            <rich-text nodes="是否确定取消此条询价信息？"></rich-text>
          </view>
          <view class="woxiangxbox">
            <view>
              <button
                class="slot-contentbutto2"
                form-type="reset"
                @click="woxiangx"
              >
                我在想想
              </button>
            </view>
            <view>
              <button
                class="slot-contentbutto"
                form-type="reset"
                @click="requerqx"
              >
                确定取消
              </button>
            </view>
          </view>
        </u-modal>
      </view>
    </view></page-loading
  >
</template>

<script src="./newInquiry.js"></script>
<style lang="scss" scoped>
@import './newInquiry.scss';
</style>
